package com.ruoyi.liborder.service.impl;

import com.ruoyi.liborder.domain.LibOrderRecord;
import com.ruoyi.liborder.mapper.LibOrderRecordMapper;
import com.ruoyi.liborder.service.ILibOrderRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LibOrderRecordServiceImpl implements ILibOrderRecordService {
    @Autowired
    private LibOrderRecordMapper libOrderRecordMapper;

    /**
     * 查询预约
     *
     * @param recordId 预约主键
     * @return 预约
     */
    @Override
    public LibOrderRecord selectLibOrderRecordByRecordId(String recordId) {
        return libOrderRecordMapper.selectLibOrderRecordByRecordId(recordId);
    }

    /**
     * 查询预约列表
     *
     * @param libOrderRecord 预约
     * @return 预约
     */
    @Override
    public List<LibOrderRecord> selectLibOrderRecordList(LibOrderRecord libOrderRecord) {
        return libOrderRecordMapper.selectLibOrderRecordList(libOrderRecord);
    }

    /**
     * 新增预约
     *
     * @param libOrderRecord 预约
     * @return 结果
     */
    @Override
    public int insertLibOrderRecord(LibOrderRecord libOrderRecord) {
        return libOrderRecordMapper.insertLibOrderRecord(libOrderRecord);
    }

    /**
     * 修改预约
     *
     * @param libOrderRecord 预约
     * @return 结果
     */
    @Override
    public int updateLibOrderRecord(LibOrderRecord libOrderRecord) {
        return libOrderRecordMapper.updateLibOrderRecord(libOrderRecord);
    }

    /**
     * 批量删除预约
     *
     * @param recordIds 需要删除的预约主键
     * @return 结果
     */
    @Override
    public int deleteLibOrderRecordByRecordIds(String[] recordIds) {
        return libOrderRecordMapper.deleteLibOrderRecordByRecordIds(recordIds);
    }

    /**
     * 删除预约信息
     *
     * @param recordId 预约主键
     * @return 结果
     */
    @Override
    public int deleteLibOrderRecordByRecordId(String recordId) {
        return libOrderRecordMapper.deleteLibOrderRecordByRecordId(recordId);
    }
}